function[Hp, Ht, Hr, Et, Ep, ...
    Period, np, nt] = read_x3dg_res(File_1)

fid = fopen(File_1, 'r', 'n');

LBlock = fread(fid, 1, 'long');
NO = fread(fid, 1, 'long');
Period = fread(fid, 1, 'double'); 
np = fread(fid, 1, 'long');
nt = fread(fid, 1, 'long');
fseek(fid, LBlock*4, 'bof'); 

Hpr = fread(fid, [nt np], 'float')*4*pi*100.;
Hpi = fread(fid, [nt np], 'float')*4*pi*100.;

Htr = fread(fid, [nt np], 'float')*4*pi*100.;
Hti = fread(fid, [nt np], 'float')*4*pi*100.;

Hrr = fread(fid, [nt np], 'float')*4*pi*100.;
Hri = fread(fid, [nt np], 'float')*4*pi*100.;

Epr = fread(fid, [nt np], 'float')*1.0E+06;
Epi = fread(fid, [nt np], 'float')*1.0E+06;

Etr = fread(fid, [nt np], 'float')*1.0E+06;
Eti = fread(fid, [nt np], 'float')*1.0E+06;


Hr     = complex(Hrr,-Hri);
Hp     = complex(Hpr,-Hpi);               
Ht     = complex(Htr,-Hti);
Et     = complex(Etr,-Eti);
Ep     = complex(Epr,-Epi);

fclose(fid);

end